﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ResearchListDetails.aspx.vb" Inherits="myproject.ResearchListDetails" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            height: 64px;
        }
        .style2
        {
            height: 120px;
        }
        .style3
        {
            height: 65px;
            width: 203px;
        }
        .style4
        {
            width: 203px;
            height: 58px;
        }
        .style5
        {
            width: 212px;
            height: 54px;
        }
        .style6
        {
            height: 54px;
        }
        .style7
        {
            width: 212px;
        }
        .style8
        {
            width: 203px;
            height: 60px;
        }
        .style9
        {
            height: 60px;
        }
        .style10
        {
            height: 101px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

              
              <div>
        <table width="920" cellspacing="30" style="border-top-style: groove; border-right-style: groove; border-left-style: groove;">
             <tr>
             <td class="style1">
             <h1 style="border-bottom-style: groove">Research List Details</h1>
             <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="ResearchListDetailsDataSource" DataKeyNames="ID" Width="842px">
        <Columns>
            <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
            <asp:ImageField DataImageUrlField="FirstPagePicture" HeaderText="Sample Page">
                <ControlStyle BackColor="#669999" BorderColor="#99CCFF" BorderStyle="Groove" 
                    Height="280px" Width="280px" />
                <FooterStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:ImageField>
            <asp:BoundField DataField="AddedBy" HeaderText="AddedBy" 
                SortExpression="AddedBy" />
            <asp:BoundField DataField="FieldOfStudy" HeaderText="FieldOfStudy" 
                SortExpression="FieldOfStudy" />
            <asp:BoundField DataField="University" HeaderText="University" 
                SortExpression="University" />
            <asp:BoundField DataField="Contact" HeaderText="Contact" 
                SortExpression="Contact" />
            <asp:HyperLinkField DataNavigateUrlFields="Link" HeaderText="Link" 
                Text="Link" />
        </Columns>
                    <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
        <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
        <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
        <SortedAscendingCellStyle BackColor="#F4F4FD" />
        <SortedAscendingHeaderStyle BackColor="#5A4C9D" />
        <SortedDescendingCellStyle BackColor="#D8D8F0" />
        <SortedDescendingHeaderStyle BackColor="#3E3277" />
    </asp:GridView>
    <asp:SqlDataSource ID="ResearchListDetailsDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        SelectCommand="SELECT * FROM [Researches] WHERE ([ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
   </td> 
    </tr>

             <tr>
             <td class="style1">
             <h1 style="border-bottom-style: groove">Comments</h1>     
             <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
             style="margin-right: 604px">
                         <Columns>
                             <asp:BoundField DataField="Author" HeaderText="Author" 
                                 SortExpression="Author" />
                             <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                             <asp:BoundField DataField="Comment" HeaderText="Comment" 
                                 SortExpression="Comment" />
                         </Columns>
                                     <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
        <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
        <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
        <SortedAscendingCellStyle BackColor="#F4F4FD" />
        <SortedAscendingHeaderStyle BackColor="#5A4C9D" />
        <SortedDescendingCellStyle BackColor="#D8D8F0" />
        <SortedDescendingHeaderStyle BackColor="#3E3277" />
              </asp:GridView>
                     <asp:SqlDataSource ID="ResearchListDetailsCommentsDataSource" runat="server" 
                         ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                         ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                         SelectCommand="SELECT [Author], [Comment], [Title] FROM [Comments] WHERE ([Research_fkID] = ?)">
                         <SelectParameters>
                             <asp:QueryStringParameter Name="Research_fkID" QueryStringField="ID" 
                                 Type="Int32" />
                         </SelectParameters>
              </asp:SqlDataSource>
    
    </td>
    </tr> 
    </table>

             <table width="920" cellspacing="30" 
                 style="border-right-style: groove; border-left-style: groove;"
                 style="border-left-style: groove" style="border-right-style: groove">

             <tr>
             <td class="style1">
             <h1 style="border-bottom-style: groove">Add Your Comment Here</h1>
             </td> 
             </tr> 
             </table>

             <table  width="920" cellspacing="30" 
                 style="border-right-style: groove; border-left-style: groove; 
                 style="border-left-style: groove" style="border-right-style: groove">
             <tr>
             <td>
             <p>You are logged in with the User Name:</p>
             </td>
             <td>
             <p><asp:LoginName ID="currentUserName" runat="server" />
    </p>
             </td>
             </tr>
             <tr>
             <td>Comment Title:
             </td>
             <td>
             <asp:TextBox ID="tb_commentTitle" runat="server" Width="350px"></asp:TextBox>
             </td>
             </tr>
             
             <p>
             <tr>
             <td class="style2">Comment Plaintext: 
             </td>
             <td class="style2">
             <asp:TextBox ID="tb_commentPlaintext" runat="server" Width="350px" 
            Height="82px" EnableTheming="True" TextMode="MultiLine"></asp:TextBox>
             </td>
             </tr>
             </p>  
             <tr>
             <td>
             </td>
             <td>
             <asp:Button ID="btn_submitComment" runat="server" Text="Submit Comment" 
                     Height="28px" Width="137px" Font-Bold="true" Font-Size=Small />
             </td>
             </tr>

             </table>  
             <table width="920" cellspacing="30" 
                 style="border-right-style: groove; border-left-style: groove;"
                 style="border-left-style: groove" style="border-right-style: groove">

                 <tr>
             <td class="style1">
             <h1 style="border-bottom-style: groove">Tags Available for this Research</h1>
             </td> 
             </tr> 
                 <tr>
             <td class="style10">


        <asp:BulletedList ID="BulletedList1" runat="server" 
        DataSourceID="tagsAvailableDataSource" DataTextField="Tag" DataValueField="Tag">
    </asp:BulletedList>
    <asp:SqlDataSource ID="tagsAvailableDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"  
        SelectCommand="SELECT [Tag], [ID] FROM [Tags] WHERE ([ID] = ?)">
 <SelectParameters>
            <asp:QueryStringParameter Name="ID" 
                QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
             </td>
             </tr>


             
             </table>
             <table  width="920" cellspacing="30" 
                 style="border-right-style: groove; border-left-style: groove; 
                 style="border-left-style: groove" style="border-right-style: groove">
             
             <tr>
             <td class="style1">
             <h1 style="border-bottom-style: groove">Add Tags for the Research</h1>
             </td> 
             </tr> 
             <tr>
             <td class="style4">
             
                 <asp:CheckBoxList ID="cbl_Tags" runat="server" 
                     RepeatDirection="Horizontal" DataSourceID="TagsDataSource" 
                     DataTextField="Tag" DataValueField="ID">
                 </asp:CheckBoxList>
                 </td>
                 </tr>
                 </table>
                 
                 <table  width="920" cellspacing="30" 
                 style="border-right-style: groove; border-left-style: groove; border-left-style: groove; border-right-style: groove">
                 <tr>
                 <td class="style8">
                 Select available tags:
                 </td>
                 <td class="style9">
                 <asp:Button ID="btn_addTag" runat="server" Text="Add Tag" 
                     Height="28px" Width="137px" Font-Bold="true" Font-Size=Small />
                 </td>
                 </tr>
                 <tr>
                 <td class="style3">
                 <asp:SqlDataSource ID="TagsDataSource" runat="server" 
                     ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                     ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                     SelectCommand="SELECT [ID], [Tag] FROM [Tags] WHERE ([Tag] &lt;&gt; ?)">
                     <SelectParameters>
                         <asp:Parameter DefaultValue=" " Name="Tag" Type="String" />
                     </SelectParameters>
                 </asp:SqlDataSource>
                 </td>
                 </tr>
                 </table>
                 <table width="920" cellspacing="30" 
                 style="border-right-style: groove; border-left-style: groove; border-left-style: groove; border-right-style: groove">

                  <tr>
                  <td class="style1">
                  <h1 style="border-bottom-style: groove">Add New Tags here</h1>
                  </td> 
                  </tr> 
                  </table>

                 <table width="920" cellspacing="30" 
                 style="border-right-style: groove; border-left-style: groove;" > 
                  <tr>
                 <td class="style5">
                 You can also add Tags here!(seperate them by comma):
                 </td>
                 <td class="style6">
                 <asp:TextBox ID="tb_addNewTag" runat="server" Width="300px" 
                         style="margin-left: 0px"></asp:TextBox>
                 </td>
                 </tr>
                 <tr>
                 <td class="style7">
                 </td>
                 <td>
             <asp:Button ID="btn_tagResearch" runat="server" Text="Add New Tag" 
                     Height="28px" Width="137px" Font-Bold="true" Font-Size=Small />
             </td>
             </tr>
             </table>
            
            
             <table width="920" cellspacing="30" 
                 style="border-right-style: groove; border-left-style: groove;"
                 style="border-left-style: groove" style="border-right-style: groove">

                  <tr>
                  <td class="style1">
                  <h1 style="border-bottom-style: groove">Rate this Research</h1>
                  </td> 
                  </tr> 
                  </table>
                  <table width="920" cellspacing="30" 
                 style="border-right-style: groove; border-left-style: groove; border-bottom-style: groove" > 
                  
        
        
  <tr>
  <td>
  
  </td>
  <td>
      <asp2:Rating ID="r_researchRating" BorderWidth="0" BorderStyle="Solid" width="336px" Height="35px" 
     CurrentRating="1" runat="server" 
    StarCssClass="researchRating" 
    WaitingStarCssClass="savedResearchRating" 
    EmptyStarCssClass="researchWithoutRating" 
    filledStarCssClass="researchWithRating" 
    MaxRating="5" ></asp2:Rating>
     
  </td>
  </tr>
  
  <tr>
  <td>

      <asp2:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
      </asp2:ToolkitScriptManager>

</td>
  <td>
  <asp:Button ID="btn_researchRating" runat="server" Text="Rate it!" 
                     Height="28px" Width="137px" Font-Bold="true" Font-Size=Small />
  </td>
  </tr>  
    

    </table>
        </div>
   

</asp:Content>
